using System;
using System.Data; 
 using System.Collections.Generic; 
using System.Data.SqlClient;
using Core;

 namespace DataAccess
{
	public class tbResource: Popular
	{

 public  int ResourceID {get; set; }
 public  string ResourceName {get; set; }
 public  string Path {get; set; }
 public  string Image {get; set; }
 public  int Active {get; set; }
 public  string Description {get; set; }
 public  DateTime CreatedDate {get; set; }
 public  int TypeResourcecID {get; set; }
 public int OrgID { get; set; }
  Common<tbResource> cm = new Common<tbResource>();
  public bool Insert(Popular b){
 return cm.Insert(b as tbResource , "sp_tbResource_Insert");
 }
 public bool Update(Popular b){
 return cm.UpDate(b as tbResource, "sp_tbResource_Update"); 
 }
  public bool Delete(object b){return cm.Delete(b, "sp_tbResource_Delete"); 
 }
  public IDataReader Select_ID(object b){
  return cm.Select_ID(b, "sp_tbResource_SelectByID"); 
 }
  public List<tbResource> Select_Org_ReType(object[] b)
  {
      return CBO.FillCollection<tbResource>(DataProvider.Instance.ExecuteReader("sp_tbResource_SelectByOrg_TypeRe", b));
     
  }
     public IDataReader Select_Name(object b) {
   return cm.Select_Name(b, "sp_tbResource_SelectByName");}
 public IDataReader SelectAll(){
 return cm.Select_All("sp_tbResource_SelectAll");
 }
 public List<tbResource > SelectAllToList() {
 return cm.SelectAll<tbResource>("sp_tbResource_SelectAll");}
 } 
 }